<ion-view title="评论详情" hide-nav-bar="true" style="background: #EFEFEF;">
    <ion-content class="has-footer" scroll="false" overflow-scroll="true">
        <ion-scroll direction="y" on-scroll="scrollFun()" delegate-handle="pageScroll" style="width: 100%;height: 100%;position: fixed;">
            <div>
                <div class="container">
                    <div class="list" style="margin: 0px;">
                        <div class="item item-avatar">
                            <img ng-src="{{vm.commentInfo.memberAvatarPath}}">
                            <div class="dynamic-comment-info-div">
                                <h2 style="float: left;">{{vm.commentInfo.memberName}}</h2>
                                <p ng-click="replyComment(vm.commentInfo.id,vm.commentInfo.memberId,vm.commentInfo.memberName,vm.commentInfo.parentCommentId,$event)"><i class="ion ion-chatbox-working"></i>回复</p>
                                <p ng-click="likeComment(item)" ng-class="{true:'hadLikes'}[vm.commentInfo.hadLikes === '1']"><i class="fa fa-thumbs-o-up"></i>{{vm.commentInfo.likes}}</p>
                            </div>
                            <p style="font-size: 0.8rem;margin: 2px 0px;color: #BFBFBF;">{{vm.commentInfo.createDate|timeAgo}}</p>
                        </div>
                        <div class="item item-body" style="border: 0px;">
                            {{vm.commentInfo.comment}}
                        </div>
                    </div>
                    <div id="commentBox" class="list" style="margin: 0px;">
                        <p class="padding" style="font-size: 1.2rem;color: #B1B1B1;">最新回复</p>
                        <div class="item item-avatar" ng-repeat="item in vm.exhortaions track by $index" style="border: 0px;background: transparent;">
                            <img ng-src="{{item.memberAvatarPath}}">
                            <div class="dynamic-comment-info-div">
                                <h2 style="float: left;">{{item.memberName}}</h2>
                                <p ng-click="replyComment(item.id,item.memberId,item.memberName,item.parentCommentId,$event)"><i class="ion ion-chatbox-working"></i>回复</p>
                                <p ng-click="likeComment(item)" ng-class="{true:'hadLikes'}[item.hadLikes === '1']"><i class="fa fa-thumbs-o-up"></i>{{item.likes}}</p>
                            </div>
                            <p style="font-size: 0.8rem;margin: 2px 0px;color: #BFBFBF;">{{item.createDate|timeAgo}}</p>
                            <p class="comment-p" style="white-space: normal;font-size: 1.0rem;margin: 10px 0px;" ng-text-truncate="item.comment" ng-tt-chars-threshold="100" ng-tt-more-label="查看更多" ng-tt-less-label="收起"></p>
                            <div style="width: 100%;background: #E6E6E6;color: #ccc;" ng-show="item.reply > 0">
                                <p style="padding: 5px;">查看全部{{item.reply}}条回复<i class="ion ion-ios-arrow-forward" style="padding: 5px;"></i></p>
                            </div>
                            <div style="height: 20px;width: 100%;">
                                <a ng-show="{{item.memberId === vm.loginAccount.memberId || vm.loginAccount.memberType === '1'}}" href="javascript:;" style="float: right;" ng-click="deleteComment(item.id,$index)">删除</a>
                            </div>
                        </div>
                        <div class="load-more-btn" style="text-align: center;" ng-show="vm.loadMoreBtnStatus == false">
                            <p class="no-data-p">下面没有更多的回复了</p>
                        </div>
                        <ion-infinite-scroll immediate-check="false" on-infinite="loadMoreComment()" distance="20%" ng-show="vm.loadMoreBtnStatus"></ion-infinite-scroll>
                    </div>
                </div>
            </div>
            <div style="width: 100%;height: 50px;">&nbsp;</div>
        </ion-scroll>
        <div class="dynamic-footer">
            <input class="comment-input" type="button" value="点击添加评论....." id="showCommentsBtn1" style="width: 100%;"/>
        </div>
    </ion-content>
    <div id="dynamic-comment-box1" style="display: none;">
        <div class="textarea-box">
            <p ng-class="{true: 'ng-hide'}[vm.toReply == null]">回复：{{vm.toReply.name}}</p>
            <textarea class="dynamic-comment-textarea" ng-model="vm.comment"></textarea>
            <button ng-click="commitComment()">发表</button>
        </div>
        <div class="weui-mask"></div>
    </div>
</ion-view>